package com.ruoyi.chat.ws;

import java.util.Date;

public class MessageVo {
    Integer id;//消息id
    Long sendUserId;//发送者id
    String sendName;//发送者名字
    String sendHeader;//发送者头像


    String messageText;//内容
    String messageLink;//链接类
    String messageImage;//图片类
    String recalled;//是否撤回
    String createTime;//时间

    String groupName;//目标群聊
    Long userIdPul;//目标用户id
    String pullName;//目标用户名字
    String pullHeader;//目标用户头像
    MessageType type;

    public MessageVo(String messageText, MessageType type) {
        this.messageText = messageText;
        this.type = type;
    }

    public MessageVo() {
    }

    enum MessageType {//消息类型
        JOIN//连接
        ,LEAVE//离开
        ,MESSAGE//发送消息
    }

    public String getPullHeader() {
        return pullHeader;
    }

    public void setPullHeader(String pullHeader) {
        this.pullHeader = pullHeader;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Long getSendUserId() {
        return sendUserId;
    }

    public void setSendUserId(Long sendUserId) {
        this.sendUserId = sendUserId;
    }

    public String getSendName() {
        return sendName;
    }

    public void setSendName(String sendName) {
        this.sendName = sendName;
    }

    public String getSendHeader() {
        return sendHeader;
    }

    public void setSendHeader(String sendHeader) {
        this.sendHeader = sendHeader;
    }

    public String getMessageText() {
        return messageText;
    }

    public void setMessageText(String messageText) {
        this.messageText = messageText;
    }

    public String getMessageLink() {
        return messageLink;
    }

    public void setMessageLink(String messageLink) {
        this.messageLink = messageLink;
    }

    public String getMessageImage() {
        return messageImage;
    }

    public void setMessageImage(String messageImage) {
        this.messageImage = messageImage;
    }

    public String getRecalled() {
        return recalled;
    }

    public void setRecalled(String recalled) {
        this.recalled = recalled;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public Long getUserIdPul() {
        return userIdPul;
    }

    public void setUserIdPul(Long userIdPul) {
        this.userIdPul = userIdPul;
    }

    public String getPullName() {
        return pullName;
    }

    public void setPullName(String pullName) {
        this.pullName = pullName;
    }

    public MessageType getType() {
        return type;
    }

    public void setType(MessageType type) {
        this.type = type;
    }
}

//public record MessageVo(
//        Integer id;//消息id
//        String name;//发送者名字
//        String text;//内容
//        String time;//时间
//        String avatar;//发送者头像
//        String to;//目标
//        String group;//群聊
//        MessageType type
//) {
//    public MessageVo(String text; MessageType type) {
//        this(null; null; text; null; null; null; null; type);
//    }
//
//    enum MessageType {//消息类型
//        JOIN//连接
//        ; LEAVE//离开
//        ; MESSAGE//发送消息
//    }
//}